Repository navigation
fix(mcp): slim the open door's tools/list; the served SKILL.md carries the teaching and names validate_expression's variables - #35682
Conversation
…e served SKILL.md tools/list for an API key on a self-hosted app (17 tools) drops from 46,827 to 35,614 bytes; the descriptions this package owns drop from 17,602 to 8,162. Each description keeps what a call needs: the arguments, the confirmation a destructive call takes, and the refusal it may answer. Worked examples, answer-reading guidance and edge cases move to the SKILL.md /api/v1/mcp/skill serves, and to its Console mirror byte for byte. No tool is removed or renamed; no schema shape, required list or enum changes. A new measurement test prints the per-tool table and holds the total under a ceiling. Two pins move with the text: the My Pending filter example is now pinned on the served skill, and the flow-failure read order is pinned on the answer only, the descriptions pointing at its second block. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
…input The served skill and its Console mirror now list `variables?` in validate_expression's signature, and say that at a flow_condition the shadowed-read warning, and the binding of a bare name to the variable rather than the field, need it. The tool accepts it only there. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
The served skill's tool list is pinned by the Console's mirror test to the tools every caller is served; aggregate_records registers only where the host carries an aggregate member. Its moved text now sits under the query_records entry, worded for where it is offered. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
📓 Docs Drift CheckThis PR changes 1 package(s): 32 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 67adea88378c0285e323cabab012bd9542b6af85 && git checkout 67adea88378c0285e323cabab012bd9542b6af85
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ca4ec2a2f1b10ca1bde4af7acd56bc69d2c75f40 be505439137a685ce0d40b391b8f813be58b10ef && git checkout -B drift-repro ca4ec2a2f1b10ca1bde4af7acd56bc69d2c75f40 && git merge --no-ff be505439137a685ce0d40b391b8f813be58b10ef
node scripts/docs-audit/affected-docs.mjs --json ca4ec2a2f1b10ca1bde4af7acd56bc69d2c75f40
|
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz Final green head: |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1H9ixhgepGZ7fawhL L1 verdict (L1-a): CHANGES at head Gates on this head: 55 check-runs: 45 success, 10 skipped, 0 failed, 0 pending. Must-fix:
What I checked (holds):
Notes (non-blocking):
Next: fix 1 is a body edit. Fix 2 moves the head. I do a delta review on the new final green head. Generated by Claude Code |
…nfirmation refusal The slimmed description said a refusal ACTION_CONFIRMATION_REQUIRED means nothing ran, but dropped what to do about it: a decline, cancel, timeout or missing confirmation service now says do not retry unless the user asks. "Never runs on this call" beside "accept runs it once" read as a mixed signal; the action now runs only once the person approves it. The weight test's stub bridge gains createUploadLinkForNewRecord, which the runtime bridge serves, so the measured surface carries create_upload_link's new-record text. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz Final green head: |
|
repo:objectstack#4 · os-elon-musk · session_016WV4cxk4f4T7at3YeFruhZ L1 verdict (L1-a): ACCEPT (delta) at head Delta Must-fix items are resolved:
Also in the delta:
Gates on this head: 59 check-runs: 47 success, 12 skipped, 0 failed, 0 pending. Note (non-blocking): the base told a client that on Not governed (no Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44677633825 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
…kup and the approvals-waiting filter The slimmed description dropped the two lines the dogfood suites pin (ruling B colleague lookup; the pending-for-me approvals filter). Each comes back as one short sentence; the full guidance stays in SKILL.md. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz Final green head: |
|
repo:objectstack#4 · os-elon-musk · session_016WV4cxk4f4T7at3YeFruhZ L1 verdict (L1-a): ACCEPT (delta) at head Delta
Gates on this head: 59 check-runs: 47 success, 12 skipped, 0 failed, 0 pending. Note (non-blocking, L1 lesson): the review at Not governed. The seat re-enqueues it. Generated by Claude Code |
Requested by Elon · project thread
Part of #34689
Fixes #33272
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
#34689: the open door's
tools/listis slimmed. Measured on this branch's base (c0716ed4) by the newpackages/mcp/src/tools-list-weight-34689.test.ts: the API-key surface of a self-hosted app (17 tools, the dataset descriptions being the real service-analytics definitions) through a realtools/listround-trip.c0716ed4)be505439)tools/listresponsepackages/mcpownsPer tool, bytes (description / input schema):
Round 3 (merge-queue regression, build 44677814137): query_records keeps two short lines the dogfood pins (ruling B) read — the
sys_usercolleague lookup and thesys_approval_requestpending-approver filter (+237 B;packages/qa/dogfoodcolleague-lookup and approval-read files pass 20/20 locally, unedited). Round 2 (L1 note 3): the weight test's stub bridge now servescreateUploadLinkForNewRecordlike the runtime bridge, so both columns were re-measured with it (round 1 read 46,827 → 35,614 without it); run_action regained "nothing ran; do not retry unless the user asks" (+90 B). The card read 40,341 bytes ona0326b06; the surface grew to 47,712 before this branch, so the before column is re-measured, not copied.Each description keeps what a call needs without the skill: its arguments, the confirmation a destructive call takes, the refusal it may answer and what to do then. What moved to the served SKILL.md (
packages/mcp/src/skill-md.ts, rendered at/api/v1/mcp/skill, and its Console mirror byte for byte):describe_object: the readonly / defaultValue / validation-message facts.query_records: thelatestPerandexpandworked examples, whatsourcenames, and the approvals-waiting-on-you filter (a new Conventions bullet). The person-field lookup was already there.aggregate_records: select-order, currency naming and the lookup-label rule, under thequery_recordsentry (it registers only where the host carries an aggregate member; the Console's tool-list pin holds the bullet list to every caller's tools).get_record: therelatedexample.run_action: theFLOW_FAILEDrelay (the answer's second text block already carries the reason, chosen in the console's read order).create_upload_link: the read-only,readonlyWhenand approval-lock cases (in the conditional file-tool lines).validate_expression: its description now names the facts to pass per site and points at the skill, which already listed every check by site; it gains the date-equality warning.The rest was cut outright where the answer already says it (the withheld-fields note, the recycle-bin restore route, which the skill keeps).
Tombstones, decided per tool.
aggregate_recordsaggregations[].distinct(its description 1,098 bytes): rides intools/list. It is the spec's ownAggregationNodeSchema, taken whole on purpose (the code forbids a local copy of the entry), and its description is the same string the refusal prints. Taking it out oftools/listalone needs a rewrite layer over the SDK's schema output, a new mechanism; shortening it changes the refusal's wording. Both are out of this card.run_action/resume_runretiredconfirm: refusal alone, unchanged: the member is already absent fromtools/listand refused with its prescription.No other tombstone is in
tools/list.#33272: the skill names
variables. The served SKILL.md and its Console mirror listvariables?invalidate_expression's signature, and say that at aflow_conditionthe shadowed-read warning, and the binding of a bare name to the variable rather than the field, need it. Checked against the merged contract (PR #33255): the handler refusesvariablesat any other site.Pins moved (old answer, then new answer, and the card behind it):
mcp-system-object-ai-read.test.ts([Decision] Should an approver be able to see and decide their pending approvals over MCP? #32442):query_records' description carried the My Pending filter, now the served skill carries it (mcp: slim the open door's tool list (40 KB at tools/list; validate_expression alone is 7.8 KB) #34689 moves worked examples to the skill).mcp-action-refusal-details.test.ts(MCP run_action: a business refusal inside the action's flow comes back as the engine chain ("Flow '…' failed: Node '…' failed: update_record(…) failed: 电子发票 is required"), while the console shows 「电子发票不能为空」 #32757):run_action's description taught the read orderdetails.errorMessage, thenuserMessage, thendetails.innerRefusal.message; now both descriptions point at the second text block, and the read order stays pinned on the answer in the same file (mcp: slim the open door's tool list (40 KB at tools/list; validate_expression alone is 7.8 KB) #34689).Every other description pin holds as it was, including the delete approval rule in both the description and the
confirmmember, the #34877 author's-or-platform's description sentence, the ranking andtotalGroupssentences, and the file-tool new-record wording.Tests
packages/mcp: vitest, typecheck
pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2on73c5d9bc:Test Files 80 passed (80),Tests 1440 passed (1440).pnpm --filter @objectstack/mcp typecheck(through the verify lock):VERDICT command-exit 0;check:test-typecheck: OK.ui/:pnpm exec vitest run apps/console/src/pages/developer/objectstack-skill.test.ts:Tests 13 passed (13)(the mirror equals the canonical render).Verification
Two-minute check:
pnpm --filter @objectstack/mcp exec vitest run src/tools-list-weight-34689.test.tsprints the table above and asserts the total stays under 38,000 bytes.Read first, by risk:
packages/mcp/src/mcp-http-tools.ts(therun_actionandvalidate_expressiondescription hunks);packages/mcp/src/skill-md.ts(the moved text); the two moved pins.Local derived gates
node scripts/pm/dispatch-gates.mjs --commandson73c5d9bcderived 71 families; all 71 run, exit codes captured before any pipe;--ranreconciliation:71 derived famil(ies) accounted for — 69 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).node scripts/check-plugin-teardown-shape.mjs --self-testexit 3 (its positive control is pinned to a commit this shallow checkout cannot reach);pnpm check:dual-build-cjs-loadsexit 3 (PREREQUISITE NOT MET: about 48 packages have nodist/in this worktree).pnpm --dir ui exec vitest run scripts/exit 1:Test Files 2 failed | 169 passed, both failuresFailed to resolve entry for package "@objectstack/client"(not built here). The diff touches noui/scripts/input.CI runs all three.
Acceptance notes
list_datasets/query_datasetdescriptions (2,979 bytes) are the service-analytics definitions;query_dataset's 4,591-byte schema is the spec'sQueryDatasetInputSchema;validate_expression'svariablesitems carry the spec'sFlowVariableSchemadescriptions (1,838 bytes, one of them a 1,000-byte paragraph on record-reference inputs). They are the largest remaining blocks.aggregate_recordsskill text from its own bullet to underquery_recordsafter the Console's tool-list pin went red on it.Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
🤖 Generated with Claude Code